package com.andy.note.main.model.proxy.demo3;

import java.lang.reflect.Method;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

/**
 *
 * @author Andy
 * @version $Revision: 1.1 $ $Date: 2020年6月30日 上午11:20:04 $
 */
public class MyMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
        System.out.println("买车前开始找车源。。。。");
        Object invokeSuper = proxy.invokeSuper(obj, args);
        System.out.println("买车后办理手续。。。。");
        return invokeSuper;
    }

}
